//https://github.com/bailicangdu/react-pxq/
var path = require('path');
var webpack = require('webpack');

module.exports = {
    entry: {
        "vuedemo": './ts/vuedemo/vuedemo.ts',
        "demo": './ts/vuedemo/deno1.ts'
    },
    output: {
        filename: '[name].js',
        path: __dirname + '/js/dist'
    },
    module: {
        rules: [
            {
                test: /\.tsx?$/,
                //和默认的tsconfig.json有差别的地方
                loader: 'ts-loader?' + JSON.stringify({
                    configFileName : 'tsconfig_webpack.json'
                }),
                exclude: /node_modules/,
            },
        ]
    },
    resolve: {
        extensions: [".tsx", ".ts", ".js"]
    },

    externals: {
        "Vue": "Vue"
    },

    plugins: [
        new webpack.optimize.UglifyJsPlugin({
            output: {
                comments: false, // remove all comments
            },
            compress: {
                warnings: false
            }
        })
    ]
};